home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7294 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  965 b 

  1. Path: quadostimpy.natinst.com!user
  2. From: rcauvin@natinst.com (Roger L. Cauvin)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: pow(-1,1.1) = DOMAIN error
  5. Date: 22 Feb 1996 16:26:34 GMT
  6. Organization: National Instruments
  7. Message-ID: <rcauvin-1102961030180001@quadostimpy.natinst.com>
  8. References: <Christian.Straka.15.0010E3C9@uni-konstanz.de>
  9. NNTP-Posting-Host: quadostimpy.natinst.com
  10.  
  11. In article <Christian.Straka.15.0010E3C9@uni-konstanz.de>,
  12. Christian.Straka@uni-konstanz.de (Christian Straka) wrote:
  13.  
  14. > The pow() and powl() function in <math.h> doesn't work properly. The
  15. following 
  16. > example causes a DOMAIN error exception (see defs in math.h):
  17. >              pow(-1,1.1);
  18.  
  19. (-1)^1.1 = (-1)^(11/10) = ((-1)^11)^(1/10) = (-1)^(1/10) = imaginary
  20.  
  21. In English:  taking the 1.1th power of -1 is equivalent to taking the 10th
  22. root of -1.  The 10th root of -1 is an imaginary number.
  23.  
  24.  
  25. Roger
  26.  
  27. ---
  28.  
  29. Roger L. Cauvin
  30. rcauvin@natinst.com
  31. Software Engineer
  32. National Instruments
  33.